<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="description" content="" />
    <meta name="author" content="ChongMing" />
    <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-touch-fullscreen" content="yes">
    <meta name="full-screen" content="yes">
    <meta name="screen-orientation" content="portrait">
    <meta name="x5-fullscreen" content="true">
    <meta name="360-fullscreen" content="true">
    <title>提交订单</title>
</head>
<link rel="stylesheet" href="../css/reset.css">
<link rel="stylesheet" href="../css/swiper-3.3.1.min.css">
<link rel="stylesheet" href="css/geneticTesting.css">
<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/jquery.mobile-1.4.3.js"></script>
<script type="text/javascript" src="../js/swiper-3.3.1.jquery.min.js"></script>
<script type="text/javascript" src="js/geneticTesting.js"></script>
<script type="text/javascript" src="js/vue.js"></script>
<script type="text/javascript">
    $(function(){
        $('body').on('touchmove', function (event) {
            event.preventDefault();
        });
        var address_id = geneticTesting.getQueryString('id');
        var data = {
            uid:1,
            gene_id:1,
            address_id:address_id
        }
        geneticTesting.ord_preview('address/getPrice',data)
        var num = 1;
        $('.sub-order .order-detail .buy-num .right .plus').click(function(){
            var price = $('#sub-order').data('price');
            num++
            $('.sub-order .order-detail .buy-num .right .num').html(num);
            $('.sub-order .botpay .left .text .span_1').html('￥'+price*num)
        });
        $('.sub-order .order-detail .buy-num .right .reduce').click(function(){
            var price = $('#sub-order').data('price');
            if(num>1){
                num--
                $('.sub-order .order-detail .buy-num .right .num').html(num);
                $('.sub-order .botpay .left .text .span_1').html('￥'+price*num)
            }else{
                num = 1
                $('.sub-order .order-detail .buy-num .right .num').html(num);
            }
        });
    });
</script>
<body style=" background: #ebebeb; margin: auto;-webkit-overflow-scrolling: touch;overflow: scroll;">
<div class="sub-order" id="sub-order" data-price="{{total_amount}}">
    <div v-if="is_have_address==0" class="add-address">
        <img src="images/icon8.png">
        <p>还没收货地址<span>去添加</span></p>
    </div>
    <div v-on:click="link(address_id)" v-if="is_have_address==1" class="address-infor">
        <div class="name public"><p>收货人：</p><span>{{user_name}}</span></div>
        <div class="add public"><p>收货地址：</p><span>{{address_desc}}</span></div>
        <div class="phone public"><p>联系方式：</p><span>{{mobile}}</span></div>
    </div>
    <div class="order-detail">
        <div class="price">
            <div class="left">
                <img v-bind:src="gene_img_pic">
                <p>{{gene_name}}</p>
            </div>
            <div class="right">
                <p>￥{{total_amount}}元</p>
            </div>
        </div>
        <div class="buy-num">
            <p class="left">购买数量</p>
            <div class="right">
                <div class="plus public">+</div>
                <div class="num">1</div>
                <div style=" line-height: 4.6vw" class="reduce public">-</div>
            </div>
        </div>
        <div class="mode">
            <p class="left">支付方式</p>
            <div class="right">
                <div class="wechat public">
                    <img class="icon" src="../hospital_nurse/images/icon42.png">
                    <img class="radio" src="../hospital_nurse/images/icon40.png">
                </div>
                <div class="wechat public">
                    <img class="icon" src="../hospital_nurse/images/icon43.png">
                    <img class="radio" src="../hospital_nurse/images/icon40.png">
                </div>
            </div>
        </div>
        <div class="remarks">
            <p class="left">备注：</p>
            <input type="text">
        </div>
    </div>
    <div class="botpay">
        <div class="left">
            <div class="text"><span class="span">合计：</span><span class="span_1">￥{{total_amount}}</span><span class="span_2">(已省：￥30)</span></div>
        </div>
        <div class="right">支付</div>
    </div>
</div>
<div class="editadd" id="editadd">
    <div class="addlist" v-for="item in list">
        <div class="con">
            <img v-on:click="link2(item.address_id)" v-if="item.is_default==1" class="radio" data-id="{{item.address_id}}" src="images/icon6.png">
            <img v-on:click="link2(item.address_id)" v-if="item.is_default==0" class="radio" data-id="{{item.address_id}}" src="images/icon5.png">
            <div class="center">
                <p class="top">
                    <span class="name">{{item.user_name}}</span>
                    <span class="phone">{{item.mobile}}</span>
                </p>
                <p class="bot"><span>{{item.address_desc}}</span></p>
            </div>
            <img v-on:click="link(item.address_id)" data-id="{{item.address_id}}" src="images/icon9.png" class="edit">
        </div>
        <div class="del" data-id="{{item.address_id}}">删除</div>
    </div>
</div>
<div class="editadd-button">
    <button>新增地址</button>
</div>
</body>
</html>